package com.zhengyuedong.bbs.core.action;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.zhengyuedong.bbs.core.entity.Topic;
import com.zhengyuedong.bbs.core.service.TopicService;

public class IndexAction extends ActionSupport {

	private TopicService topicService;
	private List<Topic> topicList;

	public String load() throws Exception {
		topicList = topicService.findTopicByPage(0, 50);
		return "success";
	}

	public List<Topic> getTopicList() {
		return topicList;
	}

	public void setTopicList(List<Topic> topicList) {
		this.topicList = topicList;
	}

	public TopicService getTopicService() {
		return topicService;
	}

	public void setTopicService(TopicService topicService) {
		this.topicService = topicService;
	}

}
